<?php

namespace pmvc\annotation;

/**
 * Interface for reading {@link Annotation}s.
 *
 */
interface AnnotationReader {

	/**
	 * Reads class level annotations optionally limmiting it
	 * to return the specified types.
	 * 
	 * @param string|ReflectionClass $class the class
	 * @param string $types types to return
	 * @return array of \pmvc\annotations\Annotation
	 */
	function readClassAnnotations($class, Array $types=Array());

	/**
	 * Reads property level annotations optionally limmiting it
	 * to return the specified types.  The {@code $property} parameter
	 * can be a {@link ReflectionProperty} or an array in the
	 * following form:
	 * <pre>
	 * Array('\namepsace\ClassName', 'propertyName')
	 * </pre>
	 *
	 * @param array|ReflectionProperty $property the property
	 * @param array $types the types to return
	 * @return array of \pmvc\annotations\Annotation
	 */
	function readPropertyAnnotations($property, Array $types=Array());

	/**
	 * Reads method level annotations optionally limmiting it
	 * to return the specified types.  The {@code $method} parameter
	 * can be a {@link ReflectionMethod} or an array in the
	 * following form:
	 * <pre>
	 * Array('\namepsace\ClassName', 'methodName')
	 * </pre>
	 *
	 * @param array|ReflectionMethod $method the method
	 * @param array $types the types to return
	 * @return array of \pmvc\annotations\Annotation
	 */
	function readMethodAnnotations($method, Array $types=Array());

	/**
	 * Reads function level annotations optionally limmiting it
	 * to return the specified types.
	 * 
	 * @param string|callback $function the function
	 * @param array $types the types to return
	 * @return array of \pmvc\annotations\Annotation
	 */
	function readFunctionAnnotations($function, Array $types=Array());

}

?>